package com.vcms.cms.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * ContentCount entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "content_count", catalog = "vcms_0.1")
public class ContentCount implements java.io.Serializable {

	// Fields

	private Integer contentCountId;
	private Content content;
	private Integer views;
	private Integer viewsMonth;
	private Integer viewsWeek;
	private Integer viewsDay;
	private Integer comments;
	private Integer commentsMonth;
	private Integer commentsWeek;
	private Integer commentsDay;
	private Integer downloads;
	private Integer downloadsMonth;
	private Integer downloadsWeek;
	private Integer downloadsDay;
	private Integer ups;
	private Integer upsMonth;
	private Integer upsWeek;
	private Integer upsDay;
	private Integer downs;
	private Set<Content> contents = new HashSet<Content>(0);

	// Constructors

	/** default constructor */
	public ContentCount() {
	}

	/** full constructor */
	public ContentCount(Content content, Integer views, Integer viewsMonth,
			Integer viewsWeek, Integer viewsDay, Integer comments,
			Integer commentsMonth, Integer commentsWeek, Integer commentsDay,
			Integer downloads, Integer downloadsMonth, Integer downloadsWeek,
			Integer downloadsDay, Integer ups, Integer upsMonth,
			Integer upsWeek, Integer upsDay, Integer downs,
			Set<Content> contents) {
		this.content = content;
		this.views = views;
		this.viewsMonth = viewsMonth;
		this.viewsWeek = viewsWeek;
		this.viewsDay = viewsDay;
		this.comments = comments;
		this.commentsMonth = commentsMonth;
		this.commentsWeek = commentsWeek;
		this.commentsDay = commentsDay;
		this.downloads = downloads;
		this.downloadsMonth = downloadsMonth;
		this.downloadsWeek = downloadsWeek;
		this.downloadsDay = downloadsDay;
		this.ups = ups;
		this.upsMonth = upsMonth;
		this.upsWeek = upsWeek;
		this.upsDay = upsDay;
		this.downs = downs;
		this.contents = contents;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "contentCountId", unique = true, nullable = false)
	public Integer getContentCountId() {
		return this.contentCountId;
	}

	public void setContentCountId(Integer contentCountId) {
		this.contentCountId = contentCountId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "contentId")
	public Content getContent() {
		return this.content;
	}

	public void setContent(Content content) {
		this.content = content;
	}

	@Column(name = "views")
	public Integer getViews() {
		return this.views;
	}

	public void setViews(Integer views) {
		this.views = views;
	}

	@Column(name = "viewsMonth")
	public Integer getViewsMonth() {
		return this.viewsMonth;
	}

	public void setViewsMonth(Integer viewsMonth) {
		this.viewsMonth = viewsMonth;
	}

	@Column(name = "viewsWeek")
	public Integer getViewsWeek() {
		return this.viewsWeek;
	}

	public void setViewsWeek(Integer viewsWeek) {
		this.viewsWeek = viewsWeek;
	}

	@Column(name = "viewsDay")
	public Integer getViewsDay() {
		return this.viewsDay;
	}

	public void setViewsDay(Integer viewsDay) {
		this.viewsDay = viewsDay;
	}

	@Column(name = "comments")
	public Integer getComments() {
		return this.comments;
	}

	public void setComments(Integer comments) {
		this.comments = comments;
	}

	@Column(name = "commentsMonth")
	public Integer getCommentsMonth() {
		return this.commentsMonth;
	}

	public void setCommentsMonth(Integer commentsMonth) {
		this.commentsMonth = commentsMonth;
	}

	@Column(name = "commentsWeek")
	public Integer getCommentsWeek() {
		return this.commentsWeek;
	}

	public void setCommentsWeek(Integer commentsWeek) {
		this.commentsWeek = commentsWeek;
	}

	@Column(name = "commentsDay")
	public Integer getCommentsDay() {
		return this.commentsDay;
	}

	public void setCommentsDay(Integer commentsDay) {
		this.commentsDay = commentsDay;
	}

	@Column(name = "downloads")
	public Integer getDownloads() {
		return this.downloads;
	}

	public void setDownloads(Integer downloads) {
		this.downloads = downloads;
	}

	@Column(name = "downloadsMonth")
	public Integer getDownloadsMonth() {
		return this.downloadsMonth;
	}

	public void setDownloadsMonth(Integer downloadsMonth) {
		this.downloadsMonth = downloadsMonth;
	}

	@Column(name = "downloadsWeek")
	public Integer getDownloadsWeek() {
		return this.downloadsWeek;
	}

	public void setDownloadsWeek(Integer downloadsWeek) {
		this.downloadsWeek = downloadsWeek;
	}

	@Column(name = "downloadsDay")
	public Integer getDownloadsDay() {
		return this.downloadsDay;
	}

	public void setDownloadsDay(Integer downloadsDay) {
		this.downloadsDay = downloadsDay;
	}

	@Column(name = "ups")
	public Integer getUps() {
		return this.ups;
	}

	public void setUps(Integer ups) {
		this.ups = ups;
	}

	@Column(name = "upsMonth")
	public Integer getUpsMonth() {
		return this.upsMonth;
	}

	public void setUpsMonth(Integer upsMonth) {
		this.upsMonth = upsMonth;
	}

	@Column(name = "upsWeek")
	public Integer getUpsWeek() {
		return this.upsWeek;
	}

	public void setUpsWeek(Integer upsWeek) {
		this.upsWeek = upsWeek;
	}

	@Column(name = "upsDay")
	public Integer getUpsDay() {
		return this.upsDay;
	}

	public void setUpsDay(Integer upsDay) {
		this.upsDay = upsDay;
	}

	@Column(name = "downs")
	public Integer getDowns() {
		return this.downs;
	}

	public void setDowns(Integer downs) {
		this.downs = downs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contentCount")
	public Set<Content> getContents() {
		return this.contents;
	}

	public void setContents(Set<Content> contents) {
		this.contents = contents;
	}

}